home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / xcmd / xrulesde.sit / Xrules™ Demo / card_5723.txt < prev    next >
Encoding:
Text File  |  1991-06-24  |  6.2 KB  |  278 lines

  1. -- card: 5723 from stack: in
  2. -- bmap block id: 6138
  3. -- flags: 4000
  4. -- background id: 4129
  5. -- name: monitor
  6. ----- HyperTalk script -----
  7. on openCard
  8.   scrollToBottom "card field trace of this card"
  9.   scrollToBottom "card field facts of this card"
  10.   scrollToBottom "card field stack of this card"
  11. end openCard
  12.  
  13.  
  14.  
  15. -- part 1 (field)
  16. -- low flags: 01
  17. -- high flags: 0007
  18. -- rect: left=6 top=17 right=160 bottom=506
  19. -- title width / last selected line: 0
  20. -- icon id / first selected line: 0 / 0
  21. -- text alignment: 0
  22. -- font id: 22
  23. -- text size: 10
  24. -- style flags: 0
  25. -- line height: 13
  26. -- part name: trace
  27.  
  28.  
  29. -- part 2 (button)
  30. -- low flags: 00
  31. -- high flags: 8003
  32. -- rect: left=396 top=324 right=339 bottom=471
  33. -- title width / last selected line: 0
  34. -- icon id / first selected line: 0 / 0
  35. -- text alignment: 1
  36. -- font id: 0
  37. -- text size: 12
  38. -- style flags: 0
  39. -- line height: 16
  40. -- part name: continue
  41. ----- HyperTalk script -----
  42. on mouseUp
  43.   global direction
  44.  
  45.   chain direction
  46. end mouseUp
  47.  
  48.  
  49.  
  50. -- part 4 (button)
  51. -- low flags: 00
  52. -- high flags: 8003
  53. -- rect: left=396 top=307 right=322 bottom=471
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 0
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: init
  62. ----- HyperTalk script -----
  63. on mouseUp
  64.   global direction, ilsi_trace, ilsi_facts, ilsi_stack, ilsi_step
  65.  
  66.   put "" into card field "trace"
  67.   put "" into card field "facts"
  68.   put "" into card field "stack"
  69.   if hilight of card button "trace" = false then
  70.     put "" into ilsi_trace
  71.     put "" into ilsi_facts
  72.     put "" into ilsi_stack
  73.   else
  74.     put "card field trace of card monitor" into ilsi_trace
  75.     put "card field facts of card monitor" into ilsi_facts
  76.     put "card field stack of card monitor" into ilsi_stack
  77.   end if
  78.   if hilight of card button "step" = false then
  79.     put "" into ilsi_step
  80.   else
  81.     put "monitor" into ilsi_step
  82.   end if
  83.   if card field "chain" = "Backward Chain" then
  84.     put "backward" into direction
  85.     initXrules card field goal
  86.   else
  87.     put "forward" into direction
  88.     initXrules
  89.   end if
  90.   chain direction
  91. end mouseUp
  92.  
  93.  
  94.  
  95. -- part 7 (field)
  96. -- low flags: 00
  97. -- high flags: 0002
  98. -- rect: left=6 top=324 right=338 bottom=224
  99. -- title width / last selected line: 0
  100. -- icon id / first selected line: 0 / 0
  101. -- text alignment: 0
  102. -- font id: 22
  103. -- text size: 10
  104. -- style flags: 0
  105. -- line height: 13
  106. -- part name: goal
  107. ----- HyperTalk script -----
  108. on returnInField
  109.   global direction, ilsi_trace, ilsi_facts, ilsi_stack, ilsi_step
  110.  
  111.   put "" into card field "trace"
  112.   put "" into card field "facts"
  113.   put "" into card field "stack"
  114.   if hilight of card button "trace" = false then
  115.     put "" into ilsi_trace
  116.     put "" into ilsi_facts
  117.     put "" into ilsi_stack
  118.   else
  119.     put "card field trace of card monitor" into ilsi_trace
  120.     put "card field facts of card monitor" into ilsi_facts
  121.     put "card field stack of card monitor" into ilsi_stack
  122.   end if
  123.   if hilight of card button "step" = false then
  124.     put "" into ilsi_step
  125.   else
  126.     put "monitor" into ilsi_step
  127.   end if
  128.   if card field "chain" = "Backward Chain" then
  129.     put "backward" into direction
  130.     initXrules card field goal
  131.   else
  132.     put "forward" into direction
  133.     initXrules
  134.   end if
  135.   chain direction
  136. end returnInField
  137.  
  138.  
  139.  
  140. -- part 10 (button)
  141. -- low flags: 00
  142. -- high flags: 8005
  143. -- rect: left=8 top=2 right=17 bottom=65
  144. -- title width / last selected line: 0
  145. -- icon id / first selected line: 0 / 0
  146. -- text alignment: 1
  147. -- font id: 0
  148. -- text size: 12
  149. -- style flags: 0
  150. -- line height: 16
  151. -- part name: trace
  152. ----- HyperTalk script -----
  153. on mouseUp
  154.   global ilsi_trace, ilsi_facts, ilsi_stack
  155.  
  156.   set hilight of card button trace to not hilight of card button trace
  157.   if hilight of card button "trace" = false then
  158.     put "" into ilsi_trace
  159.     put "" into ilsi_facts
  160.     put "" into ilsi_stack
  161.   else
  162.     put "card field trace of card monitor" into ilsi_trace
  163.     put "card field facts of card monitor" into ilsi_facts
  164.     put "card field stack of card monitor" into ilsi_stack
  165.   end if
  166. end mouseUp
  167.  
  168.  
  169.  
  170. -- part 11 (button)
  171. -- low flags: 00
  172. -- high flags: 8005
  173. -- rect: left=68 top=2 right=17 bottom=126
  174. -- title width / last selected line: 0
  175. -- icon id / first selected line: 0 / 0
  176. -- text alignment: 1
  177. -- font id: 0
  178. -- text size: 12
  179. -- style flags: 0
  180. -- line height: 16
  181. -- part name: step
  182. ----- HyperTalk script -----
  183. on mouseUp
  184.   global ilsi_step
  185.  
  186.   set hilight of card button step to not hilight of card button step
  187.   if hilight of card button "step" = false then
  188.     put "" into ilsi_step
  189.   else
  190.     put "monitor" into ilsi_step
  191.   end if
  192. end mouseUp
  193.  
  194.  
  195.  
  196. -- part 13 (field)
  197. -- low flags: 01
  198. -- high flags: 0007
  199. -- rect: left=6 top=173 right=305 bottom=314
  200. -- title width / last selected line: 0
  201. -- icon id / first selected line: 0 / 0
  202. -- text alignment: 0
  203. -- font id: 22
  204. -- text size: 10
  205. -- style flags: 0
  206. -- line height: 13
  207. -- part name: facts
  208.  
  209.  
  210. -- part 14 (field)
  211. -- low flags: 01
  212. -- high flags: 0007
  213. -- rect: left=322 top=173 right=305 bottom=506
  214. -- title width / last selected line: 0
  215. -- icon id / first selected line: 0 / 0
  216. -- text alignment: 0
  217. -- font id: 22
  218. -- text size: 10
  219. -- style flags: 0
  220. -- line height: 13
  221. -- part name: stack
  222.  
  223.  
  224. -- part 16 (field)
  225. -- low flags: 01
  226. -- high flags: 0002
  227. -- rect: left=385 top=1 right=16 bottom=506
  228. -- title width / last selected line: 0
  229. -- icon id / first selected line: 0 / 0
  230. -- text alignment: 0
  231. -- font id: 0
  232. -- text size: 12
  233. -- style flags: 0
  234. -- line height: 16
  235. -- part name: chain
  236. ----- HyperTalk script -----
  237. on mouseUp
  238.   global direction
  239.  
  240.   if card field "chain" = "Forward Chain" then
  241.     put "Backward Chain" into card field "chain" of card "monitor"
  242.     put "backward" into direction
  243.   else
  244.     put "Forward Chain" into card field "chain" of card "monitor"
  245.     put "forward" into direction
  246.   end if
  247. end mouseUp
  248.  
  249.  
  250.  
  251. -- part 17 (button)
  252. -- low flags: 00
  253. -- high flags: 0000
  254. -- rect: left=282 top=314 right=337 bottom=307
  255. -- title width / last selected line: 0
  256. -- icon id / first selected line: 26865 / 26865
  257. -- text alignment: 1
  258. -- font id: 0
  259. -- text size: 12
  260. -- style flags: 0
  261. -- line height: 16
  262. -- part name: Next
  263. ----- HyperTalk script -----
  264. on mouseUp
  265.   global saved_card
  266.  
  267.   if saved_card <> "" then
  268.     go to saved_card
  269.   else
  270.     go to next card
  271.   end if
  272. end mouseUp
  273.  
  274.  
  275.  
  276. -- part contents for card part 16
  277. ----- text -----
  278. Backward Chain